package com.gap.employeeposition;

import com.buanalintas.bynga.Dictionary;
import com.buanalintas.bynga.Field;
import com.buanalintas.bynga.Page;
import com.gap.entities.GapMasterEmployeePosition;

/**
 *
 * Class EmployeePosition is ...
 *
 * Generated on Wed Jan 07 10:52:06 ICT 2015
 *
 * @version 1.0
 * @author Mr. Kazao™
 * @since Bynga 1.0
 *
 */
public class EmployeePosition extends Page {

    private Field employeePositionId;

    private Field employeePositionName;

    private Field employeePositionDescription;

    public EmployeePosition() {
        super();

        setTheClass(GapMasterEmployeePosition.class);

        employeePositionId = new Field();
        employeePositionId.setName("employeePositionId");
        employeePositionId.setCaption("id");
        //employeePositionId.setInfo("employee position id");
        employeePositionId.setListProperties(" align=\"left\" width=\"1%\" nowrap");
        employeePositionId.setInputProperties(" size=\"20\"");
        getFields().add(employeePositionId);

        employeePositionName = new Field();
        employeePositionName.setName("employeePositionName");
        employeePositionName.setCaption("name");
        employeePositionName.setRequired(true);
        employeePositionName.setListProperties(" align=\"left\" width=\"40%\" nowrap");
        employeePositionName.setInputProperties(" size=\"20\"");
        getFields().add(employeePositionName);

        employeePositionDescription = new Field();
        employeePositionDescription.setName("employeePositionDescription");
        employeePositionDescription.setCaption("description");
        //employeePositionDescription.setInfo("employee position description");
        employeePositionDescription.setListProperties(" align=\"left\" width=\"60%\" nowrap");
        employeePositionDescription.setInputProperties(" cols=\"50\" rows=\"5\"");
        employeePositionDescription.setInputType(Field.INPUT_TEXT_AREA);
        getFields().add(employeePositionDescription);

        fillFields();
        getFieldsAdd().remove(employeePositionId);
        getFieldsEdit().remove(employeePositionId);
        getFieldsList().remove(employeePositionId);
        
        setExportList(getClass().getResourceAsStream("EmployeeJobPositionList.jasper"));
        setExport(getClass().getResourceAsStream("EmployeeJobPosition.jasper"));
    }

    @Override
    public void beforeExport() {
        getExportParams().put("title", Dictionary.getValue(this, "Employee Job Position"));
    }

    @Override
    public void beforeExportMulti() {
        beforeExport();
    }
}
